<!--#include file="Config.asp" -->
<!--#include file="HeadTop.asp"-->


<div class="panel panel-default">
  <!-- Default panel contents -->
  <div class="panel-heading">Users 注册用户</div>
  <div class="panel-body">
    <p>包含<%=GetTblRows("Users")%>条用户的记录！</p>
  </div>
			<table class="table table-striped table-bordered table-condensed">
					<tr>
						<td>ID</td>
						<td>UserName/Email</td>
						<td>RightAdmin</td>
						<td>RegDate</td>
					</tr>
<%
set rs=server.createobject("ADODB.Recordset")
sql="select * from Users order by id desc"
rs.open sql,conn,1,1
rcount=rs.recordcount
if pmcount="" or isempty(pmcount) or pmcount<1 then
        pmcount=10
end if
rs.pagesize=pmcount   	'设置每页数
mpage=rs.pagecount    	'得到总页数
page=int(request("page"))
if isempty(page) or cint(page)<1 or cint(page)>mpage then
	page=1
end if
if rcount<>0 then
rs.absolutepage=page	'将指针移至指定页的第一条记录
end if
loopno=pmcount
do while not rs.eof and loopno>0
%>
				<tr>
					<td><%=int(rs("ID"))%></td>
					<td><a href="UserAccout.asp?ID=<%=int(rs("ID"))%>"><%=trim(rs("username"))%>_<%=trim(rs("email"))%></a></td>
					<td><%=trim(rs("RightAdmin"))%></td>
					<td><%=trim(rs("RegDate"))%></td>
				</tr>
<%
rs.movenext
loopno=loopno-1
loop
rs.close
set rs=nothing
%>
</table>
<div class="panel-footer">
[当前第<%=Page%>页]
<%If Page <> 1 Then ' 如果不是位于第一页 %>
<A HREF='?Page=1'>首页</A>
<A HREF='?Page=<%=(Page-1)%>'>上一页</A>
<%End If
  If Page <> maxpage Then ' 如果不是位于最后一页
%>
<A HREF='?Page=<%=(Page+1)%>'>下一页</A>
<A HREF='?Page=<%=maxpage%>'>末页</A>
<%End If%>
</div>

</div>

<!-- Footer -->
<!--#include file="Foot.asp"-->
